#include "res.h"

hgeSprite* sprYeah = NULL;
hgeSprite* sprFail = NULL;

static hgeSprite *S_LoadImage( const char *filename )
{
	hgeSprite *spr;
	HTEXTURE tex = hge->Texture_Load(filename);
	spr = new hgeSprite(tex,0,0,(float)hge->Texture_GetWidth(tex),(float)hge->Texture_GetHeight(tex));
	spr->SetHotSpot(spr->GetWidth()/2,spr->GetHeight()/2);

	return spr;
}

static void S_FreeImage( hgeSprite *spr )
{
	hge->Texture_Free(spr->GetTexture());
	delete spr;
}

int  ResLoad()
{
	sprYeah = S_LoadImage("image/yeah.jpg");
	sprFail = S_LoadImage("image/fail.jpg");

	return 1;
}
void ResFree()
{
	S_FreeImage(sprYeah);
	S_FreeImage(sprFail);
}